import type { SparkTypes } from '#/utils/types/types';
/**
 * 定义 RowType 接口，用于描述 系统用户表 数据库行的结构。
 */

export interface RowType {
  id: string;
  avatar: string;
  nickname: string;
  username: string;
  password: string;
  email: string;
  phone: string;
  sex: number;
  status: number;
  remark: string;
  deptId: string;
  createBy: string;
  createTime: string;
  updateBy: string;
  updateTime: string;
}
/**
 * 详情字段配置
 */
export const DetailsColumns: SparkTypes.DetailsTypes[] = [
  {
    title: '头像',
    field: 'avatar',
    span: 3,
    params: {
      image: true,
    },
  },
  {
    title: '用户昵称',
    field: 'nickname',
  },
  {
    title: '用户账号',
    field: 'username',
  },
  {
    title: '邮箱',
    field: 'email',
  },
  {
    title: '手机号',
    field: 'phone',
  },
  {
    title: '性别',
    field: 'sex',
    params: {
      dictCode: 'sex',
    },
  },
  {
    title: '状态',
    field: 'status',
    params: {
      dictCode: 'status',
    },
  },
  {
    title: '备注',
    field: 'remark',
    span: 3,
  },
  {
    title: '部门',
    field: 'deptId_dictText',
  },
  {
    title: '创建时间',
    field: 'createTime',
  },
];
